# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-arpspoof
_pkgname=ArpSpoof
pkgver=1.1.2
pkgrel=4
pkgdesc='mplements an ARP Spoofer for MIM (Man-In-the-Middle) or DoS (Denial of Service) attacks.'
arch=('any')
url='https://pypi.org/project/arpspoof/#files'
license=('MIT')
depends=('python' 'python-scapy' 'python-pythontoolskit')
makedepends=('python-build' 'python-pip' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('4707857da3a406342cc9610c57e295e56b37a9a9f908c2605e53a9a48160fd0525dc5b6176f19e5ccef80f977652835e10100342a816dae9e6759a2e701cee94')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

